home *** CD-ROM | disk | FTP | other *** search
/ PC Home 138 / PC Home issue 138.iso / Software / Essentials / Netscape / browser.xpi / bin / res / forms.css < prev    next >
Encoding:
Cascading Style Sheet File  |  2002-10-02  |  9.9 KB  |  423 lines

  1. /* ***** BEGIN LICENSE BLOCK *****
  2.  * Version: NPL 1.1/GPL 2.0/LGPL 2.1
  3.  *
  4.  * The contents of this file are subject to the Netscape Public License
  5.  * Version 1.1 (the "License"); you may not use this file except in
  6.  * compliance with the License. You may obtain a copy of the License at
  7.  * http://www.mozilla.org/NPL/
  8.  *
  9.  * Software distributed under the License is distributed on an "AS IS" basis,
  10.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11.  * for the specific language governing rights and limitations under the
  12.  * License.
  13.  *
  14.  * The Original Code is mozilla.org code.
  15.  *
  16.  * The Initial Developer of the Original Code is 
  17.  * Netscape Communications Corporation.
  18.  * Portions created by the Initial Developer are Copyright (C) 1998
  19.  * the Initial Developer. All Rights Reserved.
  20.  *
  21.  * Contributor(s):
  22.  *
  23.  * Alternatively, the contents of this file may be used under the terms of
  24.  * either the GNU General Public License Version 2 or later (the "GPL"), or 
  25.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  26.  * in which case the provisions of the GPL or the LGPL are applicable instead
  27.  * of those above. If you wish to allow use of your version of this file only
  28.  * under the terms of either the GPL or the LGPL, and not to allow others to
  29.  * use your version of this file under the terms of the NPL, indicate your
  30.  * decision by deleting the provisions above and replace them with the notice
  31.  * and other provisions required by the GPL or the LGPL. If you do not delete
  32.  * the provisions above, a recipient may use your version of this file under
  33.  * the terms of any one of the NPL, the GPL or the LGPL.
  34.  *
  35.  * ***** END LICENSE BLOCK ***** */
  36.  
  37. /** 
  38.   Styles for old GFX form widgets
  39.  **/ 
  40.  
  41.  
  42. @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
  43. @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
  44.  
  45. *|*:-moz-fieldset-content {
  46.   display: block;
  47. }
  48.  
  49. form {
  50.   display: block;
  51.   margin: 0 0 1em 0;
  52. }
  53.  
  54. /* miscellaneous form elements */
  55.  
  56. legend {
  57.   padding-left: 2px;
  58.   padding-right: 2px;
  59.   border: none;
  60. }
  61.  
  62. fieldset {
  63.   display: block;
  64.   margin-left: 2px;
  65.   margin-right: 2px;
  66.   padding: 0.75em 0.625em;
  67.   border: 2px groove ThreeDFace;
  68. }
  69.  
  70. label {
  71.   cursor: default;
  72. }
  73.  
  74. /* default inputs, text inputs, and selects */
  75. input {
  76.   padding: 1px 0 1px 0;
  77.   border: 2px inset ThreeDFace;
  78.   background-color: -moz-Field;
  79.   color: -moz-FieldText;
  80.   font: -moz-field;
  81.   text-align: start;
  82.   vertical-align: text-bottom;
  83.   cursor: text;
  84.   -moz-box-sizing: border-box;
  85.   -moz-user-focus: normal;
  86.   -moz-binding: url("resource:///res/builtin/platformHTMLBindings.xml#inputFields");
  87. }
  88.  
  89. textarea {
  90.   margin: 1px 0 1px 0;
  91.   border: 2px inset ThreeDFace;
  92.   background-color: -moz-Field;
  93.   color: -moz-FieldText;
  94.   font: medium -moz-fixed;
  95.   text-align: start;
  96.   vertical-align: text-bottom;
  97.   cursor: text;
  98.   -moz-box-sizing: border-box;
  99.   -moz-user-focus: normal;
  100.   -moz-binding: url("resource:///res/builtin/platformHTMLBindings.xml#textAreas");
  101. }
  102.  
  103. textarea > scrollbar {
  104.   cursor: default;
  105. }
  106.  
  107. *|*:-moz-singleline-textcontrol-frame {
  108.   overflow: hidden;
  109.   white-space: nowrap;
  110.   background-color: inherit;
  111.   text-align: inherit;
  112. }
  113.  
  114. select {
  115.   margin: 0;
  116.   border-color: ThreeDFace;
  117.   background-color: -moz-Field;
  118.   color: -moz-FieldText;
  119.   font: -moz-list;
  120.   white-space: nowrap;
  121.   text-align: start; 
  122.   vertical-align: text-bottom;
  123.   cursor: default;
  124.   -moz-box-sizing: border-box;
  125.   -moz-user-select: none;
  126.   -moz-user-focus: normal;
  127.  
  128.   border-width: 2px !important;
  129.   border-style: inset !important;
  130.   -moz-border-radius: 0 !important;
  131. }
  132.  
  133. select[size] {
  134.   padding: 1px 0 1px 0;
  135. }
  136. select[size="1"] {
  137.   padding: 0;
  138. }
  139.  
  140. select > input[type="button"] {
  141.   width: 12px;
  142.   height: 12px;
  143.   white-space: nowrap;
  144.   -moz-user-focus: none;
  145.  
  146.   position: static !important;
  147.   background-image: url("arrow.gif") !important;
  148.   background-repeat: no-repeat !important;
  149.   background-position: center !important;
  150. }
  151.  
  152. select > input[type="button"]:active {
  153.   background-image: url("arrowd.gif") !important;
  154. }
  155.  
  156. select[size], :-moz-select-scrolled-content {
  157.   overflow: -moz-scrollbars-vertical;
  158. }
  159.  
  160. select:-moz-dummy-option { 
  161.   visibility: hidden; 
  162.   content: "XX"; /* demo 8, edge case test 1 */
  163. }
  164.  
  165. *|*:-moz-display-comboboxcontrol-frame {
  166.   overflow: hidden;
  167.   padding: 1px 0 1px 4px;
  168.   background-color: inherit;
  169.   color: inherit;
  170.   white-space: nowrap;
  171.   text-align: inherit;
  172.   -moz-user-select: none;
  173. }
  174.  
  175. option {
  176.   display: block;
  177.   min-height: 1em;
  178.   -moz-user-select: none;
  179.   -moz-user-focus: none;
  180. }
  181.  
  182. select > option {
  183.   padding: 0 5px 0 3px;
  184. }
  185.  
  186. option:checked {
  187.   background-color: Highlight ! important;
  188.   color: HighlightText ! important;
  189. }
  190.  
  191. optgroup {
  192.   display: block;
  193.   font: -moz-list;
  194.   font-style: italic;
  195.   font-weight: bold;
  196.   -moz-user-select: none;
  197.   -moz-user-focus: none;
  198. }
  199.  
  200. optgroup > option {
  201.   padding-left: 20px;
  202.   font-style: normal;
  203.   font-weight: normal;
  204. }
  205.  
  206. optgroup:before {
  207.   display: block;
  208.   content: attr(label);
  209. }
  210.  
  211. *|*:-moz-dropdown-list {
  212.   z-index: 2147483647;
  213.   background-color: inherit;
  214.   -moz-user-select: none;
  215.  
  216.   border: 1px outset black !important; 
  217.  
  218. input[disabled],
  219. textarea[disabled],
  220. option[disabled],
  221. optgroup[disabled],
  222. select[disabled],
  223. select[disabled]:-moz-display-comboboxcontrol-frame {
  224.   color: GrayText;
  225.   cursor: default;
  226. }
  227.  
  228. /* hidden inputs */
  229. input[type="hidden"] {
  230.   display: none;
  231.   -moz-binding: none;
  232. }
  233.  
  234. /* image buttons */
  235. input[type="image"] {
  236.   padding: 0;
  237.   border: none;
  238.   background-color: transparent;
  239.   font-family: sans-serif;
  240.   font-size: small;
  241.   vertical-align: baseline;
  242.   cursor: pointer;
  243.   -moz-binding: none;
  244. }
  245.  
  246. input[type="image"][disabled] {
  247.   cursor: default;
  248. }
  249.  
  250. input[type="image"]:focus {
  251.   -moz-outline: 1px dotted -moz-FieldText;
  252. }
  253.  
  254. /* file selector */
  255. input[type="file"] {
  256.   white-space: nowrap;
  257.   cursor: default;
  258.   -moz-binding: none;
  259.  
  260.   padding: 0 !important;
  261.   border-style: none !important;
  262. }
  263.  
  264. input[type="file"] > input[type="text"] {
  265.   border-color: inherit;
  266.   background-color: inherit;
  267.   color: inherit;
  268. }
  269.  
  270. /* button part of file selector */
  271. input[type="file"] > input[type="button"] {
  272.   height: inherit;
  273. }
  274.  
  275. input[type="file"] > input[type="button"]:-moz-focus-inner
  276.  {
  277.   padding: 0px 2px 0px 2px;
  278.   border: 1px dotted transparent;
  279. }
  280.  
  281. /* radio buttons */
  282. input[type="radio"] {
  283.   width: 12px;
  284.   height: 12px;
  285.   margin: 3px 3px 0px 5px;
  286.   padding: 0;
  287.   vertical-align: baseline;
  288.   cursor: default;
  289.   -moz-binding: none;
  290.  
  291.   -moz-border-radius: 100% !important;
  292. }
  293.  
  294. /* check boxes */
  295. input[type="checkbox"] {
  296.   width: 13px;
  297.   height: 13px;
  298.   margin: 3px 3px 3px 4px;
  299.   padding: 0;
  300.   vertical-align: text-bottom;
  301.   cursor: default;
  302.   -moz-binding: none;
  303.  
  304.   -moz-border-radius: 0 !important;
  305. }
  306.  
  307. /* common features of radio buttons and check boxes */
  308.  
  309. input[type="radio"],
  310. input[type="checkbox"] {
  311.   /* same colors as |input| rule, but |!important| this time. */
  312.   background-color: -moz-Field ! important;
  313.   color: -moz-FieldText ! important;
  314.   border: 2px inset ThreeDFace ! important;
  315. }
  316.  
  317. input[type="radio"][disabled],
  318. input[type="radio"][disabled]:active,
  319. input[type="radio"][disabled]:hover,
  320. input[type="radio"][disabled]:hover:active,
  321. input[type="checkbox"][disabled],
  322. input[type="checkbox"][disabled]:active,
  323. input[type="checkbox"][disabled]:hover,
  324. input[type="checkbox"][disabled]:hover:active {
  325.   padding: 1px;
  326.   border: 1px inset ThreeDShadow ! important;
  327.   /* same as above, but !important */
  328.   color: GrayText ! important;
  329.   background-color: ThreeDFace ! important;
  330. }
  331.  
  332. input[type="checkbox"]:focus,
  333. input[type="radio"]:focus {
  334.   border-style: groove !important;
  335. }
  336.  
  337. input[type="checkbox"]:hover:active,
  338. input[type="radio"]:hover:active {
  339.   background-color: ThreeDFace ! important;
  340.   border-style: inset !important;
  341. }
  342.  
  343. *|*:-moz-radio {
  344.   width: 4px;
  345.   height: 4px;
  346.   background-color: -moz-FieldText ! important;
  347.   -moz-border-radius: 3px;
  348. }
  349.  
  350. /* buttons */
  351. button, 
  352. input[type="reset"],
  353. input[type="button"],
  354. input[type="submit"] { 
  355.   padding: 2px 0 2px 0;
  356.   border: 2px outset ButtonFace;
  357.   background-color: ButtonFace;
  358.   color: ButtonText; 
  359.   font: -moz-button;
  360.   white-space: pre;
  361.   cursor: default;
  362.   -moz-box-sizing: border-box;
  363.   -moz-user-select: none;
  364.   -moz-user-focus: normal;
  365.   -moz-binding: none;
  366. }
  367.  
  368. *|*:-moz-button-content {
  369.   display: block;
  370.   text-align: center;
  371. }
  372.  
  373. button:active:hover,
  374. input[type="reset"]:active:hover,
  375. input[type="button"]:active:hover,
  376. input[type="submit"]:active:hover {
  377.   padding: 3px 0 1px 0;
  378.   border-style: inset;
  379. }
  380.  
  381. button:-moz-focus-inner,
  382. input[type="reset"]:-moz-focus-inner,
  383. input[type="button"]:-moz-focus-inner,
  384. input[type="submit"]:-moz-focus-inner {
  385.   padding: 1px 2px 1px 2px;
  386.   border: 1px dotted transparent;
  387. }
  388.  
  389. button:focus:-moz-focus-inner,
  390. input[type="reset"]:focus:-moz-focus-inner,
  391. input[type="button"]:focus:-moz-focus-inner,
  392. input[type="submit"]:focus:-moz-focus-inner,
  393. input[type="file"] > input[type="button"]:focus:-moz-focus-inner {
  394.   border-color: ButtonText;
  395. }
  396.  
  397. button[disabled]:active, button[disabled],
  398. input[type="reset"][disabled]:active,
  399. input[type="reset"][disabled],
  400. input[type="button"][disabled]:active,
  401. input[type="button"][disabled],
  402. input[type="file"][disabled] > input[type="button"],
  403. input[type="file"][disabled] > input[type="button"]:active,
  404. select[disabled] > input[type="button"],
  405. select[disabled] > input[type="button"]:active,
  406. input[type="submit"][disabled]:active,
  407. input[type="submit"][disabled] {
  408.   padding: 3px 1px 3px 1px;
  409.   border: 1px outset ButtonShadow;
  410.   color: GrayText;
  411. }
  412.  
  413. @media print {
  414.   input, textarea, select, button {
  415.     -moz-user-focus: none !important;
  416.     -moz-user-input: none !important;
  417.   }
  418.  
  419.   input[type="file"] { height: 2em; }
  420. }
  421.  
  422.